package ch07.ex71.ex73;

public class Example7_3 {
    public static void main(String[] args) {
        HelloMachine machine=new HelloMachine();
        machine.turnOn(new SpeakHello() {
            public void speak() {
                System.out.println("hello,you are welcome!");
            }
        });
        machine.turnOn(new SpeakHello() {
            public void speak() {
                System.out.println("你好，欢迎光临");
            }
        });
    }
}
